<style type="text/css">
    @media (max-width: 375px) {


        .edit-form tr th:first-child, .edit-form tr td:first-child {
            width: 20%;
        }

        .edit-form tr th:nth-last-of-type(-n+2), .edit-form tr td:nth-last-of-type(-n+2) {
            display: none;
        }
    }

    .edit-form table > tbody > tr td a.btn-delcfg {
        visibility: hidden;
    }

    .edit-form table > tbody > tr:hover td a.btn-delcfg {
        visibility: visible;
    }

    @media (max-width: 767px) {
        .edit-form table tr th:nth-last-child(-n + 2), .edit-form table tr td:nth-last-child(-n + 2) {
            display: none;
        }
        .edit-form table tr td .msg-box {
            display: none;
        }
    }
</style>

<div class="panel panel-default panel-intro">
<!--    <div class="panel-heading">-->
<!--    </div>-->

    <div class="panel-body">
        <div class="panel-body">

            <form id="update-form" role="form" data-toggle="validator" method="POST" action="">
                {:token()}
                <div class="box-body box-profile">


                    <div class="form-group">
                        <label for="email" class="control-label">自定义支付接口商品支付名称</label>
                        <input type="text" class="form-control" id="email" name="row[buy_name]" value="{$options.buy_name|htmlentities}" />
                    </div>

                    <div class="form-group">
                        <label class="control-label">下单默认输入数据</label>
                        <div class="alert alert-success-light" style="margin-bottom: 0; padding: 5px 10px;">
                            此处配置一般用于查单验证，如需用户填写更多下单信息，请在商品信息中选择附加选项<br>
                            勾选邮箱类型后，则会往该参数内发送订单信息邮件，前提您要正确设置通知配置。
                        </div>
                        <table class="table table-responsive fieldlist" data-name="row[buy_data]" data-template="testtpl" data-tag="tr">
                            <tr>
                                <td>名称</td>
                                <td>下单提示</td>
                                <td>查单提示</td>
                                <td>下单必填</td>
                                <td>下单使用</td>
                                <td>查单使用</td>
                                <td>邮箱类型</td>
                            </tr>
                            <textarea name="row[buy_data]" class="form-control hide">{$options.buy_data}</textarea>
                        </table>
                        <!--定义模板，模板语法使用Art-Template模板语法-->
                        <script type="text/html" id="testtpl">
                            <tr class="form-inline">
                                <td><input type="text" name="row[<%=name%>][<%=index%>][name]" class="form-control" value="<%=row['name']%>" size="12"></td>
                                <td><input type="text" name="row[<%=name%>][<%=index%>][placeholder]" class="form-control" value="<%=row['placeholder']%>" size="30"></td>
                                <td><input type="text" name="row[<%=name%>][<%=index%>][search_placeholder]" class="form-control" value="<%=row['search_placeholder']%>" size="30"></td>
                                <td><input type="checkbox" name="row[<%=name%>][<%=index%>][required]" <%=row['required']%> class="" value="checked"></td>
                                <td><input type="checkbox"  name="row[<%=name%>][<%=index%>][buy]" <%=row['buy']%> class="" value="checked"></td>
                                <td><input type="checkbox"  name="row[<%=name%>][<%=index%>][search]" <%=row['search']%> class="" value="checked"></td>
                                <td><input type="checkbox"  name="row[<%=name%>][<%=index%>][email]" <%=row['email']%> class="" value="checked"></td>
                            </tr>
                        </script>
                    </div>
                    <div class="form-group">
                        <label for="c-cdk_order" class="control-label">卡密发货顺序</label>
                        <select id="c-cdk_order" data-rule="required" class="form-control selectpicker" name="row[cdk_order]">
                            <option value="asc" {if condition="$options.cdk_order == 'asc'"}selected{/if}>优先发旧添加的库存</option>
                            <option value="desc" {if condition="$options.cdk_order == 'desc'"}selected{/if}>优先发新添加的库存</option>
                            <option value="random" {if condition="$options.cdk_order == 'random'"}selected{/if}>随机</option>
                        </select>
                    </div>
                    <div class="form-group">
                        <button type="submit" class="btn btn-success">{:__('Submit')}</button>
                        <button type="reset" class="btn btn-default">{:__('Reset')}</button>
                    </div>

                </div>
            </form>
        </div>
    </div>
</div>
